<html>
<head><meta charset="utf-8"><title>does lldb (or gdb) work on rustc on Mac? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html">does lldb (or gdb) work on rustc on Mac?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="219686477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686477">(Dec 12 2020 at 03:26)</a>:</h4>
<p>I used to be able to do <code>[rust] debug = true</code> in the <code>config.toml</code> file, and the resulting <code>rustc</code> binary would be debuggable on my Mac. At some point the issues with having to code-sign my own <code>gdb</code> (as well as wanting to use <code>rr</code>) led me to stop doing this on a Mac.</p>



<a name="219686486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686486">(Dec 12 2020 at 03:26)</a>:</h4>
<p>but recently someone at work asked me why this didn't work for them</p>



<a name="219686491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686491">(Dec 12 2020 at 03:26)</a>:</h4>
<p>and I tried it myself, and I couldn't get it to work either</p>



<a name="219686503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686503">(Dec 12 2020 at 03:27)</a>:</h4>
<p>furthermore, I couldn't even backtrack: Bootstrapping an older checkout of <code>rust.git</code> with <code>debug = true</code> did not resolve the problem. Which makes me think this is something related to changes to Mac OS X's lldb.</p>



<a name="219686561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686561">(Dec 12 2020 at 03:29)</a>:</h4>
<p>Meanwhile I see evidence that we at some point were building our own fork of <code>lldb</code>, but then we ...s topped? Or put that support directly in our <code>llvm-project</code> fork? But then when I do <code>[rust] llvm-tools = true</code>, I don't get a build of <code>lldb</code> amongst the other tools that generates...</p>



<a name="219686574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686574">(Dec 12 2020 at 03:29)</a>:</h4>
<p>So: Do any Mac users here actually still debug their <code>rustc</code> builds via <code>lldb</code>? (or even a self codesigned <code>gdb</code>?)</p>



<a name="219686813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686813">(Dec 12 2020 at 03:34)</a>:</h4>
<p>is <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/How.20to.20run.20debuginfo.20tests.3F/near/213777453">this</a> the answer? If so, we should see if we can making building such an <code>lldb</code> easier ...</p>



<a name="219686823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219686823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219686823">(Dec 12 2020 at 03:34)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> ^ ?</p>



<a name="219693202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219693202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219693202">(Dec 12 2020 at 06:21)</a>:</h4>
<p>That line is just to ensure that tests run with either the lldb we build ourself or a minimum lldb version as specified in the respective test.</p>



<a name="219713239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219713239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219713239">(Dec 12 2020 at 15:24)</a>:</h4>
<p>I was trying to reference this statement: “They need an lldb version compiled together with rust's LLVM.”</p>



<a name="219713335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219713335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219713335">(Dec 12 2020 at 15:27)</a>:</h4>
<p>With "they" is was refering to some (not all) of the debuginfo tests.</p>



<a name="219713793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219713793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219713793">(Dec 12 2020 at 15:37)</a>:</h4>
<p>We stripped out support for building a custom fork of lldb</p>



<a name="219713798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219713798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219713798">(Dec 12 2020 at 15:37)</a>:</h4>
<p>I would sort of expect the llvm-tools to include one? But I don't know that we enable it or if it needs more work</p>



<a name="219714897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219714897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219714897">(Dec 12 2020 at 16:06)</a>:</h4>
<p>Its sounding like no one developing atop Mac is bothering with attaching lldb to rustc anymore <span aria-label="sad" class="emoji emoji-2639" role="img" title="sad">:sad:</span></p>



<a name="219714953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219714953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219714953">(Dec 12 2020 at 16:07)</a>:</h4>
<p>FWIW, I've never tried to debug rustc - either the problem is fairly simple and I can solve it with printf debugging or it requires the standard library to reproduce and I haven't been able to replicate how bootstrap builds std</p>



<a name="219722188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219722188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thom Chiovoloni <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219722188">(Dec 12 2020 at 19:00)</a>:</h4>
<p>I had a need for this at one point (segfaults from inside LLVM, but only during bootstrapping) and tried for a while and couldn't figure out how to do it.</p>



<a name="219769553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219769553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219769553">(Dec 13 2020 at 16:55)</a>:</h4>
<p>I used to be able to do it. So I just need to track down what’s changed. Either by inspecting an old MacBook, or trying to install older MacOS in a VM....</p>



<a name="219769571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/219769571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#219769571">(Dec 13 2020 at 16:55)</a>:</h4>
<p>(I already tried older Rust checkouts, from at latest 2018; didn’t resolve things out of the box)</p>



<a name="220482092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220482092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220482092">(Dec 19 2020 at 18:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> I think I have some theories here... What command did you run to attach? Something like <code>lldb build/x86_64-apple-darwin/stage1/bin/rustc</code>?</p>



<a name="220484956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220484956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220484956">(Dec 19 2020 at 20:01)</a>:</h4>
<p>Yes I think so, that looks right</p>



<a name="220485046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220485046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220485046">(Dec 19 2020 at 20:03)</a>:</h4>
<p>I have heard anecdotally that doing rust-lldb works better, but I would like to know why what I’m doing is so poor. Is the dwarf debug info in an unexpected place?</p>



<a name="220488351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220488351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220488351">(Dec 19 2020 at 21:34)</a>:</h4>
<p>Okay, that's the first approach I would have tried as well, but it fails to find debug info for me too.</p>
<p>By default, <code>rustc</code> calls <code>dsymutil</code> on macOS, which moves the debug info to separate .dSYM bundles. However, the .dSYM bundles are not copied around by subsequent bootstrap stages, so they get left behind wherever they first appeared. For example, there are some for <code>rustc-main</code> in <code>build/x86_64-apple-darwin/stage0-rustc/x86_64-apple-darwin/release</code>. To confirm this theory, I added a symlink next to <code>rustc</code> in <code>stage1</code>:</p>
<div class="codehilite"><pre><span></span><code>(in stage1/bin) $ ln -s ../../stage0-rustc/x86_64-apple-darwin/release/rustc-main.dSYM rustc.dSYM
</code></pre></div>
<p>...and <code>lldb</code> was able to find that part correctly, but then you'd still have to repeat that for <code>dylib</code>s as well.</p>



<a name="220488421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220488421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220488421">(Dec 19 2020 at 21:36)</a>:</h4>
<p>Do you happen to have Spotlight indexing disabled for your Rust checkout in System Preferences? (I do, as normally I don't want macOS wasting time indexing build directories.) One of the ways macOS locates debug info is by Spotlight indexing the debug UUID that's inside the .dSYM bundles, so it's possible it does work today for those who leave Spotlight indexing enabled.</p>



<a name="220488505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220488505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220488505">(Dec 19 2020 at 21:38)</a>:</h4>
<p>I am tempted to send a PR to make the bootstrap code place .dSYM bundles next to things they are for, so that it's more likely to work on macOS...</p>



<a name="220488605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220488605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220488605">(Dec 19 2020 at 21:41)</a>:</h4>
<p>(another option could be just asking lldb to load these dsyms separately via e.g. <code>--symfile</code> flag)</p>



<a name="220488989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220488989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220488989">(Dec 19 2020 at 21:50)</a>:</h4>
<p>Hmm, with <code>--symfile</code> though, wouldn't you need to find all the explicit paths to each of several .dSYMs...?</p>



<a name="220494395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220494395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220494395">(Dec 20 2020 at 00:14)</a>:</h4>
<p>I wonder if you could just pass in _all_ of them that exist under the <code>build/</code></p>



<a name="220494396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220494396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220494396">(Dec 20 2020 at 00:14)</a>:</h4>
<p>but its still manual intervention</p>



<a name="220494406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220494406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220494406">(Dec 20 2020 at 00:15)</a>:</h4>
<p>That said… <a href="https://github.com/rust-lang/rust/pull/79570">https://github.com/rust-lang/rust/pull/79570</a></p>



<a name="220494415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220494415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220494415">(Dec 20 2020 at 00:15)</a>:</h4>
<p>might make sense to just expose that as a convenient rustbuild option</p>



<a name="220497670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220497670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220497670">(Dec 20 2020 at 01:58)</a>:</h4>
<p>Ah right, I've been following that stabilisation effort. <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span> Indeed, if you build <code>rustc</code> while forcing <code>-Z run-dsymutil=no</code>, you save time and debugging the compiler works as expected as well, so that seems like an even better plan.</p>



<a name="220497677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220497677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220497677">(Dec 20 2020 at 01:59)</a>:</h4>
<p>I think I'll send PR to expose that as build option as you suggested, thanks for the idea! <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="220497749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220497749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220497749">(Dec 20 2020 at 02:01)</a>:</h4>
<p>Hopefully it would be deemed safe to even default the compiler build to <code>run-dsymutil=no</code> as part of this as well (so that everyone benefits without changing their <code>rustc</code> build config).</p>



<a name="220499579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220499579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220499579">(Dec 20 2020 at 03:01)</a>:</h4>
<p>Okay, <a href="https://github.com/rust-lang/rust/pull/80213">https://github.com/rust-lang/rust/pull/80213</a> adds a build option to control <code>dsymutil</code> for compiler builds and defaults to false, which should fix the debugger situation as well. <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="220503891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220503891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220503891">(Dec 20 2020 at 05:20)</a>:</h4>
<blockquote>
<p>the .dSYM bundles are not copied around by subsequent bootstrap stages</p>
</blockquote>
<p>while I have no problem with the approach in PR <a href="https://github.com/rust-lang/rust/issues/80213">#80213</a>, wouldn't another option be to change the bootstrap so that it copies around the .dSYM bundles?</p>



<a name="220503952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220503952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220503952">(Dec 20 2020 at 05:21)</a>:</h4>
<p>I guess we could file that as a separate work-item. (But the work-item is indeed likely to be pointless, unless we start trying to distribute <code>rustc</code> builds with separate debuginfo.)</p>



<a name="220517631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220517631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220517631">(Dec 20 2020 at 12:13)</a>:</h4>
<p>yeah, afaict for rustc kind of workflow just not running dsymutil in the first place is going to result in better experience overall.</p>



<a name="220517665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220517665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220517665">(Dec 20 2020 at 12:14)</a>:</h4>
<p>defaulting the compiler to <code>dsymutil=no</code> makes sense but only if debuginfo is enabled in the first place.</p>



<a name="220517682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220517682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220517682">(Dec 20 2020 at 12:14)</a>:</h4>
<p>otherwise there's no real difference.</p>



<a name="220590411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220590411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220590411">(Dec 21 2020 at 14:44)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F/near/220503891">said</a>:</p>
<blockquote>
<p>while I have no problem with the approach in PR <a href="https://github.com/rust-lang/rust/issues/80213">#80213</a>, wouldn't another option be to change the bootstrap so that it copies around the .dSYM bundles?</p>
</blockquote>
<p>Yeah, we could do that, and it was actually my first approach, so I have something close if we wanted that.</p>



<a name="220590692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/220590692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#220590692">(Dec 21 2020 at 14:47)</a>:</h4>
<p>Now that we're defaulting to <code>run-dsymutil=no</code> though, it would only be helpful for those that might change the default. Anyway, let me know if it would be good to have so that both paths are covered for debuggability.</p>



<a name="222808620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222808620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222808620">(Jan 15 2021 at 01:27)</a>:</h4>
<p>I think I am hitting something adjacent to this as well. I have <code>[rust] debug = true</code> in my <code>config.toml</code>, but breakpoints in VSCode did not work where I wanted them. Playing around with my <code>config.toml</code> I got to the following: my bracktraces seem to lose all file loc info after going through a query.<br>
Does anyone have any idea of what might be happening here?</p>



<a name="222808625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222808625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222808625">(Jan 15 2021 at 01:27)</a>:</h4>
<p>Example backtrace:</p>
<div class="codehilite"><pre><span></span><code>thread &#39;rustc&#39; panicked at &#39;aborting due to `-Z treat-err-as-bug=1`&#39;, compiler/rustc_errors/src/lib.rs:990:27
stack backtrace:
   0: std::panicking::begin_panic
   1: rustc_errors::HandlerInner::emit_diagnostic
   2: rustc_errors::Handler::emit_diagnostic
   3: rustc_errors::diagnostic_builder::DiagnosticBuilder::emit
   4: rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_argument_types::{{closure}}
   5: rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_argument_types
   6: rustc_typeck::check::callee::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::confirm_builtin_call
   7: rustc_typeck::check::callee::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_call
   8: rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_kind
   9: rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_with_expectation
  10: rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_stmt
  11: rustc_typeck::check::fn_ctxt::_impl::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::with_breakable_ctxt
  12: rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_block_with_expected
  13: rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_kind
  14: rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_with_expectation
  15: rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_return_expr
  16: rustc_typeck::check::check::check_fn
  17: rustc_infer::infer::InferCtxtBuilder::enter
  18: rustc_typeck::check::inherited::InheritedBuilder::enter
  19: rustc_typeck::check::typeck_with_fallback
  20: rustc_typeck::check::typeck
  21: rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::typeck&gt;::compute
  22: rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl
  23: rustc_data_structures::stack::ensure_sufficient_stack
  24: rustc_query_system::query::plumbing::force_query_with_job
  25: rustc_query_system::query::plumbing::get_query_impl
  26: rustc_query_system::query::plumbing::ensure_query_impl
  27: rustc_middle::ty::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::par_body_owners
  28: rustc_typeck::check::typeck_item_bodies
  29: rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::typeck_item_bodies&gt;::compute
  30: rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl
  31: rustc_data_structures::stack::ensure_sufficient_stack
  32: rustc_query_system::query::plumbing::force_query_with_job
  33: rustc_query_system::query::plumbing::get_query_impl
  34: rustc_session::utils::&lt;impl rustc_session::session::Session&gt;::time
  35: rustc_typeck::check_crate
  36: rustc_interface::passes::analysis
  37: rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::analysis&gt;::compute
             at ./compiler/rustc_middle/src/ty/query/plumbing.rs:377:17
  38: rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl
             at ./compiler/rustc_query_system/src/dep_graph/graph.rs:362:14
  39: rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_eval_always_task
             at ./compiler/rustc_query_system/src/dep_graph/graph.rs:418:9
  40: rustc_query_system::query::plumbing::force_query_with_job::{{closure}}::{{closure}}
             at ./compiler/rustc_query_system/src/query/plumbing.rs:599:17
  41: rustc_middle::ty::query::plumbing::&lt;impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt&gt;::start_query::{{closure}}::{{closure}}::{{closure}}
             at ./compiler/rustc_middle/src/ty/query/plumbing.rs:73:74
  42: stacker::maybe_grow
             at /Users/ekuber/.cargo/registry/src/github.com-1ecc6299db9ec823/stacker-0.1.12/src/lib.rs:55:9
  43: rustc_data_structures::stack::ensure_sufficient_stack
             at ./compiler/rustc_data_structures/src/stack.rs:16:5
  44: rustc_middle::ty::query::plumbing::&lt;impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt&gt;::start_query::{{closure}}::{{closure}}
             at ./compiler/rustc_middle/src/ty/query/plumbing.rs:73:17
  45: rustc_middle::ty::context::tls::enter_context::{{closure}}
             at ./compiler/rustc_middle/src/ty/context.rs:1732:50
  46: rustc_middle::ty::context::tls::set_tlv
             at ./compiler/rustc_middle/src/ty/context.rs:1716:9
  47: rustc_middle::ty::context::tls::enter_context
             at ./compiler/rustc_middle/src/ty/context.rs:1732:9
  48: rustc_middle::ty::query::plumbing::&lt;impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt&gt;::start_query::{{closure}}
             at ./compiler/rustc_middle/src/ty/query/plumbing.rs:72:13
  49: rustc_middle::ty::context::tls::with_related_context::{{closure}}
             at ./compiler/rustc_middle/src/ty/context.rs:1776:13
  50: rustc_middle::ty::context::tls::with_context::{{closure}}
             at ./compiler/rustc_middle/src/ty/context.rs:1760:40
  51: rustc_middle::ty::context::tls::with_context_opt
             at ./compiler/rustc_middle/src/ty/context.rs:1749:22
  52: rustc_middle::ty::context::tls::with_context
             at ./compiler/rustc_middle/src/ty/context.rs:1760:9
  53: rustc_middle::ty::context::tls::with_related_context
             at ./compiler/rustc_middle/src/ty/context.rs:1773:9
  54: rustc_middle::ty::query::plumbing::&lt;impl rustc_query_system::query::QueryContext for rustc_middle::ty::context::TyCtxt&gt;::start_query
             at ./compiler/rustc_middle/src/ty/query/plumbing.rs:61:9
  55: rustc_query_system::query::plumbing::force_query_with_job::{{closure}}
             at ./compiler/rustc_query_system/src/query/plumbing.rs:597:9
  56: rustc_query_system::query::plumbing::with_diagnostics
             at ./compiler/rustc_query_system/src/query/plumbing.rs:302:18
  57: rustc_query_system::query::plumbing::force_query_with_job
             at ./compiler/rustc_query_system/src/query/plumbing.rs:596:51
  58: rustc_query_system::query::plumbing::try_execute_query
             at ./compiler/rustc_query_system/src/query/plumbing.rs:426:16
  59: rustc_query_system::query::plumbing::get_query_impl::{{closure}}
             at ./compiler/rustc_query_system/src/query/plumbing.rs:644:23
  60: &lt;rustc_query_system::query::caches::DefaultCache&lt;K,V&gt; as rustc_query_system::query::caches::QueryCache&gt;::lookup
             at ./compiler/rustc_query_system/src/query/caches.rs:114:79
  61: rustc_query_system::query::plumbing::try_get_cached
             at ./compiler/rustc_query_system/src/query/plumbing.rs:379:5
  62: rustc_query_system::query::plumbing::get_query_impl
             at ./compiler/rustc_query_system/src/query/plumbing.rs:636:5
  63: rustc_query_system::query::plumbing::get_query
             at ./compiler/rustc_query_system/src/query/plumbing.rs:738:5
  64: rustc_middle::ty::query::TyCtxtAt::analysis
             at ./compiler/rustc_middle/src/ty/query/plumbing.rs:487:17
  65: rustc_middle::ty::query::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::analysis
             at ./compiler/rustc_middle/src/ty/query/plumbing.rs:448:17
  66: rustc_driver::run_compiler::{{closure}}::{{closure}}::{{closure}}
             at ./compiler/rustc_driver/src/lib.rs:440:59
  67: rustc_interface::passes::QueryContext::enter::{{closure}}
             at ./compiler/rustc_interface/src/passes.rs:742:42
  68: rustc_middle::ty::context::tls::enter_context::{{closure}}
             at ./compiler/rustc_middle/src/ty/context.rs:1732:50
  69: rustc_middle::ty::context::tls::set_tlv
             at ./compiler/rustc_middle/src/ty/context.rs:1716:9
  70: rustc_middle::ty::context::tls::enter_context
             at ./compiler/rustc_middle/src/ty/context.rs:1732:9
  71: rustc_interface::passes::QueryContext::enter
             at ./compiler/rustc_interface/src/passes.rs:742:9
  72: rustc_driver::run_compiler::{{closure}}::{{closure}}
             at ./compiler/rustc_driver/src/lib.rs:440:13
  73: rustc_interface::queries::&lt;impl rustc_interface::interface::Compiler&gt;::enter
             at ./compiler/rustc_interface/src/queries.rs:418:19
  74: rustc_driver::run_compiler::{{closure}}
             at ./compiler/rustc_driver/src/lib.rs:341:22
  75: rustc_interface::interface::create_compiler_and_run::{{closure}}
             at ./compiler/rustc_interface/src/interface.rs:197:13
  76: rustc_span::with_source_map
             at ./compiler/rustc_span/src/lib.rs:787:5
  77: rustc_interface::interface::create_compiler_and_run
             at ./compiler/rustc_interface/src/interface.rs:191:5
  78: rustc_interface::interface::run_compiler::{{closure}}
             at ./compiler/rustc_interface/src/interface.rs:213:12
  79: rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals::{{closure}}::{{closure}}
             at ./compiler/rustc_interface/src/util.rs:152:13
  80: scoped_tls::ScopedKey&lt;T&gt;::set
             at /Users/ekuber/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137:9
  81: rustc_span::with_session_globals
             at ./compiler/rustc_span/src/lib.rs:103:5
  82: rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals::{{closure}}
             at ./compiler/rustc_interface/src/util.rs:150:9
  83: rustc_interface::util::scoped_thread::{{closure}}
             at ./compiler/rustc_interface/src/util.rs:125:24
</code></pre></div>



<a name="222808644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222808644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222808644">(Jan 15 2021 at 01:27)</a>:</h4>
<p>my <code>config.toml</code> right now</p>
<div class="codehilite"><pre><span></span><code># Includes one of the default files in src/bootstrap/defaults
profile = &quot;compiler&quot;
changelog-seen = 2
[rust]
debug = true
debug-assertions = true
debuginfo-level = 1
debuginfo-level-rustc = 1
debuginfo-level-std = 1
incremental = true
run-dsymutil = false
</code></pre></div>



<a name="222808734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222808734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222808734">(Jan 15 2021 at 01:29)</a>:</h4>
<p>This is somewhat frustrating because I know that this used to work in a different similar laptop <span aria-label="pensive" class="emoji emoji-1f614" role="img" title="pensive">:pensive:</span></p>



<a name="222809245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222809245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222809245">(Jan 15 2021 at 01:37)</a>:</h4>
<p>just modified <code>cargo.toml</code> to add the following, based on <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/More.20granular.20debug.20info.20generation">https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/More.20granular.20debug.20info.20generation</a></p>
<div class="codehilite"><pre><span></span><code>[profile.release.package.rustc_typeck]
debug = 2
[profile.release.package.rustc_mir]
debug = 2
</code></pre></div>



<a name="222809788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222809788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222809788">(Jan 15 2021 at 01:45)</a>:</h4>
<p>(That didn't seem to do the trick)</p>



<a name="222863876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222863876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222863876">(Jan 15 2021 at 14:29)</a>:</h4>
<p>Hmm, I haven't seen that particular variant before... <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> I wonder why line info would stop at the query system...</p>



<a name="222880874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222880874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222880874">(Jan 15 2021 at 16:15)</a>:</h4>
<p>debuginfo level 1 should be always enough for file position debugging information, right?</p>



<a name="222889291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222889291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222889291">(Jan 15 2021 at 17:03)</a>:</h4>
<p>I would expect it to be enough, yeah</p>



<a name="222944672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222944672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222944672">(Jan 16 2021 at 00:23)</a>:</h4>
<p>I wonder if <a href="https://github.com/rust-lang/rust/pull/79237">https://github.com/rust-lang/rust/pull/79237</a> might be related to this <span aria-label="eyes" class="emoji emoji-1f440" role="img" title="eyes">:eyes:</span></p>



<a name="222951342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222951342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222951342">(Jan 16 2021 at 02:01)</a>:</h4>
<p>tried reverting that PR, didn't help</p>



<a name="222953225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222953225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222953225">(Jan 16 2021 at 02:36)</a>:</h4>
<p>ok, I finally got it to work with <code>run-dsymbol = true</code> in my <code>config.toml</code></p>



<a name="222953239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222953239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222953239">(Jan 16 2021 at 02:36)</a>:</h4>
<div class="codehilite"><pre><span></span><code>profile = &quot;compiler&quot;
changelog-seen = 2
[rust]
debug = true
debug-assertions = false
debuginfo-level = 2
debuginfo-level-rustc = 2
debuginfo-level-std = 1
#incremental = true
run-dsymutil = true
</code></pre></div>



<a name="222953323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222953323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222953323">(Jan 16 2021 at 02:38)</a>:</h4>
<p>need to verify whether it is the level 2 across the board, or dsymutil, but either way this likely needs to go in the dev guide for mac users :)</p>



<a name="222953342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222953342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222953342">(Jan 16 2021 at 02:38)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119031">Esteban Küber</span> <a href="#narrow/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F/near/222953323">said</a>:</p>
<blockquote>
<p>need to verify whether it is the level 2 across the board, or dsymutil, but either way this likely needs to go in the dev guide for mac users :)</p>
</blockquote>
<p>do you mind adding it? :)</p>



<a name="222953371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222953371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222953371">(Jan 16 2021 at 02:39)</a>:</h4>
<p>Will likely do it, just need to figure out what I did exactly to get it to work<br>
now my backtrace looks like this</p>
<div class="codehilite"><pre><span></span><code>stack backtrace:
   0:        0x102556f29 - &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt::h5ff190e5d88ce54b
   1:        0x1025c7575 - core::fmt::write::h59b2190bace346b8
   2:        0x10254d7f4 - std::io::Write::write_fmt::h52cab6c4abaa671c
   3:        0x102556d96 - std::sys_common::backtrace::print::h2bd1c5e437f882ee
   4:        0x10254f464 - std::panicking::default_hook::{{closure}}::h587cadc63d7e957c
   5:        0x10254f239 - std::panicking::default_hook::h6969025169c312a1
   6:        0x10a5e11fe - rustc_driver::report_ice::h25bef86f77170999
   7:        0x10254f8f1 - std::panicking::rust_panic_with_hook::h72655748142049c5
   8:        0x10e9fa2fd - std::panicking::begin_panic::{{closure}}::h083f662f67288272
   9:        0x10e9fa2b8 - std::sys_common::backtrace::__rust_end_short_backtrace::h3c04c4d0753c466b
  10:        0x10eef91ae - std::panicking::begin_panic::hb49e5e2c23ee7646
  11:        0x10e9fe81f - rustc_errors::HandlerInner::emit_diagnostic::hb910422be9a2d9ad
  12:        0x10e9fdebd - rustc_errors::Handler::emit_diagnostic::h0369fdc3399bb4a4
  13:        0x10ea23c68 - rustc_errors::diagnostic_builder::DiagnosticBuilder::emit::h0585b68df3ea398a
  14:        0x10ce94516 - rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_argument_types::{{closure}}::h1dec928ad486ada4
  15:        0x10ce92864 - rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_argument_types::hba82db4c390b5ef2
  16:        0x10ce704fb - rustc_typeck::check::callee::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::confirm_builtin_call::h30715dbcfcefd986
  17:        0x10ce6eeb0 - rustc_typeck::check::callee::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_call::hb1cb235f9f4e4870
  18:        0x10ce7ec93 - rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_kind::h3ff94a040334fdd8
  19:        0x10ce7d949 - rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_with_expectation::hc9337838408c6a72
  20:        0x10ce954ca - rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_stmt::h2b9c52363cdb8150
  21:        0x10cd9550c - rustc_typeck::check::fn_ctxt::_impl::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::with_breakable_ctxt::h25b294c8c10bdad7
  22:        0x10ce957df - rustc_typeck::check::fn_ctxt::checks::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_block_with_expected::h098be6d3ee5dcbb9
  23:        0x10ce7e2eb - rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_kind::h3ff94a040334fdd8
  24:        0x10ce7d949 - rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_expr_with_expectation::hc9337838408c6a72
  25:        0x10ce873eb - rustc_typeck::check::expr::&lt;impl rustc_typeck::check::fn_ctxt::FnCtxt&gt;::check_return_expr::hcb5f98cff99588ad
  26:        0x10cc948b0 - rustc_typeck::check::check::check_fn::hc718dd2135f630f0
  27:        0x10ce39617 - rustc_infer::infer::InferCtxtBuilder::enter::hdb4be22173826fc2
  28:        0x10cc4d9b6 - rustc_typeck::check::inherited::InheritedBuilder::enter::h7c98cd5e2b5b802a
  29:        0x10cba9345 - rustc_typeck::check::typeck_with_fallback::he89477c9afe8d489
  30:        0x10cc3c1d9 - rustc_typeck::check::typeck::he5e7910c122c3d69
  31:        0x10cb98f9d - rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::typeck&gt;::compute::hc01860587bbe3666
  32:        0x10ce00f0f - rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl::h9ee4590b0cea36d5
  33:        0x10ccd1fd3 - rustc_data_structures::stack::ensure_sufficient_stack::h96ddabb43d0276b8
  34:        0x10cd47cb9 - rustc_query_system::query::plumbing::force_query_with_job::h0647b8952a9d5078
  35:        0x10cd45935 - rustc_query_system::query::plumbing::get_query_impl::hfb4ab0ec1646b587
  36:        0x10cd46dfb - rustc_query_system::query::plumbing::ensure_query_impl::h12336ea1ef71071d
  37:        0x10cb98e15 - rustc_middle::ty::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::par_body_owners::hc892fe5f0f5635a4
  38:        0x10cc400e5 - rustc_typeck::check::typeck_item_bodies::h2af9b90009509581
  39:        0x10cd8cb2d - rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::typeck_item_bodies&gt;::compute::h9e2384cb7de7bdbf
  40:        0x10cdff23a - rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl::h7d6ccf5c507bcc9c
  41:        0x10ccd5ad3 - rustc_data_structures::stack::ensure_sufficient_stack::hef208c0f8f7ef126
  42:        0x10cd55209 - rustc_query_system::query::plumbing::force_query_with_job::haecdba6de878dac5
  43:        0x10cd18eeb - rustc_query_system::query::plumbing::get_query_impl::h0642623bdc6c60da
  44:        0x10cd8d1e3 - rustc_session::utils::&lt;impl rustc_session::session::Session&gt;::time::h620fbd8d8763ecf8
  45:        0x10ccfd1ea - rustc_typeck::check_crate::h339102958cbdf896
  46:        0x10a7facb8 - rustc_interface::passes::analysis::h5dc1c3b8a43af9ea
  47:        0x10a5cbe1a - rustc_middle::ty::query::&lt;impl rustc_query_system::query::config::QueryAccessors&lt;rustc_middle::ty::context::TyCtxt&gt; for rustc_middle::ty::query::queries::analysis&gt;::compute::hf8efb25027235670
  48:        0x10a53b6ef - rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl::h9bdde538d797e303
  49:        0x10a53c8c1 - rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_eval_always_task::h634353096d3107f2
  50:        0x10a56ab8a - rustc_data_structures::stack::ensure_sufficient_stack::h3a7d1c4250235e67
  51:        0x10a583479 - rustc_query_system::query::plumbing::force_query_with_job::h59f338f2d8e07aa1
  52:        0x10a581c67 - rustc_query_system::query::plumbing::get_query_impl::hdcc800004702e895
  53:        0x10a5cc0ca - rustc_interface::passes::QueryContext::enter::h1047cb6780fb6e37
  54:        0x10a5e47ac - rustc_interface::queries::&lt;impl rustc_interface::interface::Compiler&gt;::enter::h94800eb4a628b8a0
  55:        0x10a5898db - rustc_span::with_source_map::h357c6d334ea0774a
  56:        0x10a5e5e4b - rustc_interface::interface::create_compiler_and_run::hfe7217287a655d09
  57:        0x10a5cdec2 - scoped_tls::ScopedKey&lt;T&gt;::set::ha642e3b9833b01d4
  58:        0x10a58a3ac - rustc_span::with_session_globals::ha5836fb96015d9f9
  59:        0x10a561e1e - std::sys_common::backtrace::__rust_begin_short_backtrace::h85c61205b3ec828f
  60:        0x10a5650a9 - std::panicking::try::hc5b6f4e999561d0e
  61:        0x10a5d6bb9 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h124b7bc797cf2da7
  62:        0x1025291ab - &lt;alloc::boxed::Box&lt;F,A&gt; as core::ops::function::FnOnce&lt;Args&gt;&gt;::call_once::h6529e01455bff41b
  63:        0x10256b3fa - std::sys::unix::thread::Thread::new::thread_start::h36dcb80336e89a79
  64:     0x7fff6ac49109 - __pthread_start
</code></pre></div>



<a name="222953399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222953399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222953399">(Jan 16 2021 at 02:40)</a>:</h4>
<p>so I got debugging but lost info in my tracebacks <span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="222954190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222954190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222954190">(Jan 16 2021 at 02:54)</a>:</h4>
<p>Ok, partial win: I can set breakpoints on symbols, but not on file lines both in the VSCode UI and in the terminal. When I look at the terminal info what I get is </p>
<div class="codehilite"><pre><span></span><code>(lldb) br s -r .*check_argument_types.*                                                                                                                                                                                     r
Breakpoint 1: 13 locations.
(lldb) r
Process 75382 launched: &#39;/Users/ekuber/workspace/rust/build/x86_64-apple-darwin/stage1/bin/rustc&#39; (x86_64)
librustc_driver-7b265b9d752f0948.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
Process 75382 stopped
* thread #2, name = &#39;rustc&#39;, stop reason = breakpoint 1.6
    frame #0: 0x0000000102a7126a librustc_driver-7b265b9d752f0948.dylib`rustc_typeck::check::fn_ctxt::checks::_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$::check_argument_types::hba82db4c390b5ef2 [inlined] _$LT$rustc_typeck..check..fn_ctxt..FnCtxt$u20$as$u20$core..ops..deref..Deref$GT$::deref::h2e72f3955f049a0d(self=0x000070000d178aa0) at mod.rs:163:9 [opt]
   160  impl&lt;&#39;a, &#39;tcx&gt; Deref for FnCtxt&lt;&#39;a, &#39;tcx&gt; {
   161      type Target = Inherited&lt;&#39;a, &#39;tcx&gt;;
   162      fn deref(&amp;self) -&gt; &amp;Self::Target {
-&gt; 163          &amp;self.inh
   164      }
   165  }
   166
Target 0: (rustc) stopped.
(lldb) n
Process 75382 stopped
* thread #2, name = &#39;rustc&#39;, stop reason = step over
    frame #0: 0x0000000102a71271 librustc_driver-7b265b9d752f0948.dylib`rustc_typeck::check::fn_ctxt::checks::_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$::check_argument_types::hba82db4c390b5ef2(self=0x000070000d178aa0, sp=Span @ scalar, expr=0x000000010c823a48, fn_inputs=size=1, expected_arg_tys=size=0, args=size=0, c_variadic=&lt;unavailable&gt;, tuple_arguments=&lt;unavailable&gt;, def_id=Option&lt;rustc_span::def_id::DefId&gt; @ 0x000070000d177238) at checks.rs:105:19 [opt]
   102          tuple_arguments: TupleArgumentsFlag,
   103          def_id: Option&lt;DefId&gt;,
   104      ) {
-&gt; 105          let tcx = self.tcx;
   106          // Grab the argument types, supplying fresh type variables
   107          // if the wrong number of arguments were supplied
   108          let supplied_arg_count = if tuple_arguments == DontTupleArguments { args.len() } else { 1 };
Target 0: (rustc) stopped.
(lldb) image lookup -r .*check_argument_types.*
error: invalid combination of options for the given command
(lldb) image lookup -n check_argument_types
1 match found in /Users/ekuber/workspace/rust/build/x86_64-apple-darwin/stage1/lib/librustc_driver-7b265b9d752f0948.dylib:
        Address: librustc_driver-7b265b9d752f0948.dylib[0x000000000295c210] (librustc_driver-7b265b9d752f0948.dylib.__TEXT.__text + 43354960)
        Summary: librustc_driver-7b265b9d752f0948.dylib`rustc_typeck::check::fn_ctxt::checks::_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$::check_argument_types::hba82db4c390b5ef2 at checks.rs:94
</code></pre></div>



<a name="222954210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222954210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222954210">(Jan 16 2021 at 02:55)</a>:</h4>
<p>it seems like boht tools are able to find the file, but somehow it doesn't have the full path, which I think is why the breakpoint on file line isn't working</p>



<a name="222954239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222954239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222954239">(Jan 16 2021 at 02:56)</a>:</h4>
<p>oh, wait, if I do <code>-v</code> I see the whole path <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> </p>
<div class="codehilite"><pre><span></span><code>(lldb) image lookup -n check_argument_types -v
1 match found in /Users/ekuber/workspace/rust/build/x86_64-apple-darwin/stage1/lib/librustc_driver-7b265b9d752f0948.dylib:
        Address: librustc_driver-7b265b9d752f0948.dylib[0x000000000295c210] (librustc_driver-7b265b9d752f0948.dylib.__TEXT.__text + 43354960)
        Summary: librustc_driver-7b265b9d752f0948.dylib`rustc_typeck::check::fn_ctxt::checks::_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$::check_argument_types::hba82db4c390b5ef2 at checks.rs:94
         Module: file = &quot;/Users/ekuber/workspace/rust/build/x86_64-apple-darwin/stage1/lib/librustc_driver-7b265b9d752f0948.dylib&quot;, arch = &quot;x86_64&quot;
    CompileUnit: id = {0x00000688}, file = &quot;/Users/ekuber/workspace/rust/build/x86_64-apple-darwin/stage0-rustc/x86_64-apple-darwin/release/deps/compiler/rustc_typeck/src/lib.rs/@/zs9frsqlycpm18a&quot;, language = &quot;rust&quot;
       Function: id = {0x7fffffff1666b203}, name = &quot;rustc_typeck::check::fn_ctxt::checks::_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$::check_argument_types::hba82db4c390b5ef2&quot;, mangled = &quot;_ZN12rustc_typeck5check7fn_ctxt6checks54_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$20check_argument_types17hba82db4c390b5ef2E&quot;, range = [0x0000000102a71210-0x0000000102a72585)
       FuncType: id = {0x7fffffff1666b203}, byte-size = 0, decl = checks.rs:94, compiler_type = &quot;void (struct rustc_typeck::check::fn_ctxt::FnCtxt *, struct rustc_span::span_encoding::Span, struct rustc_hir::hir::Expr *, struct &amp;[&amp;rustc_middle::ty::TyS], struct &amp;[&amp;rustc_middle::ty::TyS], struct &amp;[rustc_hir::hir::Expr], _Bool, enum rustc_typeck::check::TupleArgumentsFlag, struct core::option::Option&lt;rustc_span::def_id::DefId&gt;)&quot;
         Blocks: id = {0x7fffffff1666b203}, range = [0x102a71210-0x102a72585)
      LineEntry: [0x0000000102a71210-0x0000000102a7126a): /Users/ekuber/workspace/rust/compiler/rustc_typeck/src/check/fn_ctxt/checks.rs:94
         Symbol: id = {0x0007231a}, range = [0x0000000102a71210-0x0000000102a725c0), name=&quot;rustc_typeck::check::fn_ctxt::checks::_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$::check_argument_types::hba82db4c390b5ef2&quot;, mangled=&quot;_ZN12rustc_typeck5check7fn_ctxt6checks54_$LT$impl$u20$rustc_typeck..check..fn_ctxt..FnCtxt$GT$20check_argument_types17hba82db4c390b5ef2E&quot;
       Variable: id = {0x7fffffff1666b221}, name = &quot;self&quot;, type = &quot;&amp;rustc_typeck::check::fn_ctxt::FnCtxt&quot;, location = DW_OP_reg5 RDI, decl = checks.rs:95
       Variable: id = {0x7fffffff1666b230}, name = &quot;sp&quot;, type = &quot;Span&quot;, location = DW_OP_reg4 RSI, decl = checks.rs:96
       Variable: id = {0x7fffffff1666b23f}, name = &quot;expr&quot;, type = &quot;&amp;rustc_hir::hir::Expr&quot;, location = DW_OP_reg1 RDX, decl = checks.rs:97
       Variable: id = {0x7fffffff1666b24e}, name = &quot;fn_inputs&quot;, type = &quot;&amp;[&amp;rustc_middle::ty::TyS]&quot;, location = DW_OP_reg2 RCX, DW_OP_piece 0x8, DW_OP_reg8 R8, DW_OP_piece 0x8, decl = checks.rs:98
       Variable: id = {0x7fffffff1666b25d}, name = &quot;expected_arg_tys&quot;, type = &quot;&amp;[&amp;rustc_middle::ty::TyS]&quot;, location = DW_OP_reg9 R9, DW_OP_piece 0x8, decl = checks.rs:99
       Variable: id = {0x7fffffff1666b26c}, name = &quot;args&quot;, type = &quot;&amp;[rustc_hir::hir::Expr]&quot;, location = DW_OP_fbreg -288, decl = checks.rs:100
       Variable: id = {0x7fffffff1666b27b}, name = &quot;c_variadic&quot;, type = &quot;bool&quot;, location = , decl = checks.rs:101
       Variable: id = {0x7fffffff1666b286}, name = &quot;tuple_arguments&quot;, type = &quot;TupleArgumentsFlag&quot;, location = , decl = checks.rs:102
       Variable: id = {0x7fffffff1666b291}, name = &quot;def_id&quot;, type = &quot;Option&lt;rustc_span::def_id::DefId&gt;&quot;, location = DW_OP_fbreg -440, decl = checks.rs:103
</code></pre></div>



<a name="222954328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222954328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222954328">(Jan 16 2021 at 02:57)</a>:</h4>
<p>now it might be that I need to sourceMap <code>/Users/ekuber/workspace/rust/build/x86_64-apple-darwin/stage0-rustc/x86_64-apple-darwin/release/deps/compiler/rustc_typeck/src/lib.rs/@/zs9frsqlycpm18a</code> to <code>/Users/ekuber/workspace/rust/compiler/rustc_typeck/src/lib.rs</code></p>



<a name="222955301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222955301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222955301">(Jan 16 2021 at 03:15)</a>:</h4>
<p>That didn't work :(</p>



<a name="222955460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/222955460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#222955460">(Jan 16 2021 at 03:18)</a>:</h4>
<div class="codehilite"><pre><span></span><code>            &quot;${workplaceFolder}/build/x86_64-apple-darwin/stage0-rustc/x86_64-apple-darwin/release/deps/&quot;:&quot;${workplaceFolder}/&quot;, seems to work
</code></pre></div>



<a name="223396681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/223396681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#223396681">(Jan 20 2021 at 16:21)</a>:</h4>
<p>Wait a minute: Reading this thread, if I understand correctly, the solution to <em>my</em> problem was to <strong>stop</strong> running <code>dsymutil</code> on Mac. But the solution to <span class="user-mention" data-user-id="119031">@Esteban Küber</span> ’s problem is to start running it again? This … is not good at all, right?</p>



<a name="223403756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/223403756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#223403756">(Jan 20 2021 at 17:09)</a>:</h4>
<p>(Esteban and I just spoke 1:1 about this. They are going to look some more into fixing the backtrace issue <em>without</em> running <code>dsymutil</code> again.)</p>



<a name="223403817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/223403817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#223403817">(Jan 20 2021 at 17:09)</a>:</h4>
<p>((of course in an ideal world things would work great in with either setting.))</p>



<a name="224261872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/224261872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> J. Ryan Stinnett <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#224261872">(Jan 27 2021 at 23:06)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116083">pnkfelix</span> <a href="#narrow/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F/near/223396681">said</a>:</p>
<blockquote>
<p>Wait a minute: Reading this thread, if I understand correctly, the solution to <em>my</em> problem was to <strong>stop</strong> running <code>dsymutil</code> on Mac. But the solution to <span class="user-mention silent" data-user-id="119031">Esteban Küber</span> ’s problem is to start running it again? This … is not good at all, right?</p>
</blockquote>
<p>Right, ideally we can have everything working for all use cases <em>without</em> running <code>dsymutil</code>. There should indeed be a path to fix this backtrace issues without needing <code>dsymutil</code>. After all, it only gathers the debug info together, so perhaps backtracing needs a tweak to find debug info in non-dsym mode.</p>



<a name="232678598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/232678598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#232678598">(Mar 31 2021 at 22:59)</a>:</h4>
<p>Did anyone make any progress into investigating this?</p>
<p>I've been doing a little digging, and it appears that the symbols are simply missing from the <code>.o</code> files that are kept on-disk.  I have a hypothesis that the <code>.o</code> files only include things directly included in <code>rustc_driver</code>, and nothing from its dependencies.</p>



<a name="232683433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/232683433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#232683433">(Mar 31 2021 at 23:52)</a>:</h4>
<p>I posted <a href="https://github.com/rust-lang/rust/issues/83730">https://github.com/rust-lang/rust/issues/83730</a> with what I was able to learn. Seems to be an issue with split-debuginfo itself, not the gimli/backtrace code.</p>



<a name="232684830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/232684830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#232684830">(Apr 01 2021 at 00:08)</a>:</h4>
<p>Hm, maybe my previous comment was wrong.  I guess usually there are references to the <code>.rlib</code> files in an executable, so now I'm wondering if those are just missing from the <code>.dylib</code>?</p>



<a name="232757859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/does%20lldb%20%28or%20gdb%29%20work%20on%20rustc%20on%20Mac%3F/near/232757859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/does.20lldb.20(or.20gdb).20work.20on.20rustc.20on.20Mac.3F.html#232757859">(Apr 01 2021 at 13:41)</a>:</h4>
<p>I think <span class="user-mention" data-user-id="119031">@Esteban Küber</span> looked into it and had been saying to me that they knew what the special recipe was to get things working</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>